<div class="menu">
<div class="title">Categories <c:if
	test="${null != sessionScope.user && sessionScope.user.admin}">
 [Add Category]
</c:if></div>
<div class="content">
<c:forEach var="category" items="${categories}">
	<div class="item" id="category_<c:out value="${category.id}" />">
	<spring:url value="/products.do?categoryId={categoryId}" var="categoryUrl">
		<spring:param name="categoryId" value="${category.id}" />
	</spring:url>
	<table class="item" border=0>
		<tr>
			<td id="td_<c:out value="${category.id}"/>" width="17px"
				<c:if test="${!empty category.childrenCategories}">
				    class="expand"
					onclick="return showhide('<c:out value="${category.id}"/>')"
			</c:if>>&nbsp;</td>
			<td><a href="${fn:escapeXml(categoryUrl)}"><c:out
				value="${category.name}" /></a></td>
		</tr>
            <c:if test="${!empty category.childrenCategories}">
            <tr><td></td><td>
				<div style="display: ;position:relative" class="item"
					id="div_subcat_<c:out value="${category.id}"/>"
					status="<c:out value="${category.status}"/>"><c:forEach
					var="category1" items="${category.childrenCategories}">
					<spring:url value="/products.do?categoryId={categoryId}"
						var="categoryUrl">
						<spring:param name="categoryId" value="${category1.id}" />
					</spring:url>
					<li>&nbsp;<a href="${fn:escapeXml(categoryUrl)}"><c:out
						value="${category1.name}" /></a></li>

				</c:forEach>
				</div>
				</td>
				</tr>
			</c:if>
    </table>
	</div>
</c:forEach>
</div>